<@html title="文章管理">
	<!-- Content Header (Page header) -->
	<section class="content-header">
		<h1>
        	<i class="fa fa-file-word-o"></i> &nbsp;文章管理
        	<!--<small>Article</small>-->
    	</h1>
		<ol class="breadcrumb">
			<li>
				<a href="#"><i class="fa fa-dashboard"></i> 首页</a>
			</li>
			<li>
				<a href="#">文章管理</a>
			</li>
			<li class="active">文章管理</li>
		</ol>
	</section>

	<!-- Main content -->
	<section class="content">
		<div class="box">
	        <form class="box-header with-border" id="searchForm">
	        	<div class="row">
		            <div class="col-xs-3">
						<select class="form-control select2" name="categoryEntityList" placeholder="请选择文章分类" title="请选择文章分类">
							<option>请选择</option>
							<#list categoryEntityList as category>
								<option value="${category.categoryId}">${category.categoryTitle}</option>
							</#list>
						</select>
		            </div>
		            <div class="col-xs-3">
						<select class="form-control select2" name="sysDictEntityList" placeholder="请选择发布状态" title="请选择发布状态">
							<option>请选择</option>
							<#list sysDictEntityList as item>
								<option value="${item.sdCode}">${item.sdName}</option>
							</#list>
						</select>
		            </div>
		            <div class="col-xs-3">
						<input type="text" class="form-control" placeholder="请输入文章标题关键字" title="请输入文章标题关键字" />
		            </div>
					<div class="btn-group">
						<button type="button" class="btn btn-primary" data-btn-type="search">查询</button>
						<button type="reset" class="btn btn-default" data-btn-type="reset">重置</button>
					</div>
					<div class="btn-group">
						<button type="button" class="btn btn-default" data-btn-type="add">新增</button>
						<button type="button" class="btn btn-default" data-btn-type="edit">编辑</button>
						<button type="button" class="btn btn-default" data-btn-type="delete">删除</button>
					</div>
              	</div>
	        </form>
	        <div class="box-body">
				<table id="articleTable" class="table table-bordered table-hover">
				</table>
			</div>
		</div>
	</section>

	<script>

		var oTables = $('#articleTable').dataTable({
			'paging' : true,  		//是否分页
			'searching': false, 	//是否查询
			'scrollY':"200",  		//滚动条
			'scrollCollapse':true, 	//滚动条
			'info':true,
			'serverSide':true,
			"processing": true,
            'ajax':{
				type: "POST",
				url: "${base}/web/article/queryListByMap",
				contentType:'application/json;charset=utf-8',
				dataSrc:'result',
				data: function(data){
					data = JSON.stringify($("#searchForm").serializeJSON())
					data.page = 1;
					data.limit = 10;
					return data
				}
			},
			"columns" : [ { //列
				"title" : "文章ID", //列名
				"data" : "articleId",  //列数据名
				"width":"70"  //列宽
			}, {
				"title" : "分类",
				"data" : "articleType",
				"width":"70"
			}, {
				"title" : "作者",
				"data" : "articleAuthor",
				"width":"70"
			}, {
				"title" : "标题",
				"data" : "articleTitle",
				"width":"200"
			}, {
				"title" : "日期",
				"data" : "articleCreateDatetime",
				"width":"150"
			}, {
				"title" : "评论",
				"data" : "commitCount",
				"width":"70"
			}, {
				"title" : "状态",
				"data" : "articleStatus",
				"width":"70"
			}, {
				"title" : "操作",
				"data" : "articleStatus",
				"width":"150"
			}]
    	});
	</script>
</@html>